- /* srfrsdiv.cpp by K.Tsuru */
- // function ID = 815 BRADIX
- /*****************
- SRational class
- x/n = x.num/(x.den*n)
- ******************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- SRational RsDiv(const SRational& x, ulong n){
- if(n == 1uL) return x;
- if(n == 0) x.num.SetError(x.num.DIVIDED_BY_ZERO,"RsDiv", 815);
-
- SRational r; // r.reduceDone = false;
- r.num = x.num;
- if(n <= r.den.SlOpMaxValue()) IsMult(x.den, n, r.den);
- else r.den = x.den*(SInteger)n;
-
- r.reduce(false);
- return r;
- }
srfrsdiv.cpp : last modifiled at 2016/06/26 16:28:03(508 bytes)
created at 2016/06/26 15:57:35
The creation time of this html file is 2016/09/18 20:28:05 (Sun Sep 18 20:28:05 2016).